/**
 * Calculator.java is created by Zachariah at 2012-2-16 下午05:54:25
 */
package com.zack.designPattern.strategy;

/**
 * @author zachariah zzcfrog@gmail.com
 *
 */
public class Calculator {

	private IStrategy actualCalculator;
	
	public Calculator(IStrategy s){
		this.actualCalculator =s;
	}
	
	public void switchStrategy(IStrategy s){
		this.actualCalculator = s;
	}
	
	public int op(int a, int b){
		return actualCalculator.op(a, b);
	}
}
